Device and method for nrz cdr calibration

ABSTRACT

The disclosure is a device and a method for Non Return to Zero (NRZ) Clock Data Recovery (CDR) calibration, which includes a CDR unit and a weight calculator unit. The CDR unit receives a compensative signal of an equalization filter to generate an error signal, a sampling clock signal, a transition sampling signal and a data signal. The weight calculator unit receives the error signal, the transition sampling signal and the data signal, and then uses a run length technique to generate weight data. The weight data controls a voltage control oscillator (VCO) which calibrates the phase and the frequency of the sampling clock signal.

CROSS-REFERENCES TO RELATED APPLICATIONS

This non-provisional application claims priority under 35 U.S.C. §119(a) on patent application Ser. No. 99,119,963 filed in Taiwan, R.O.C.on Jun. 18, 2010, the entire contents of which are hereby incorporatedby reference.

BACKGROUND OF THE INVENTION

1. Technical Field

The disclosure relates to a receiver device, and more particularly to adevice and a method for Non Return to Zero (NRZ) Clock Data Recovery(CDR) calibration.

2. Related Art

FIG. 1 shows the architecture of an ordinary communication system, whichincludes a transmitter 101, a channel 102 and a receiver equalizer 103.The receiver equalizer 103 includes an equalization filter 110 and a CDRunit 120. The equalization filter 110 is used for receiving a channelsignal VX and compensating the channel signal VX to obtain acompensative signal X, and the CDR unit 120 is used for receiving thecompensative signal X and outputting a data signal Z and a samplingclock signal CLK.

If the CDR unit 120 in the prior art adjusts the sampling clock signalCLK without considering data dependence during data transition, acorrect CLK may be adjusted to be an incorrect CLK, and the CLKadjustment may be slowed down. Moreover, when the channel signal VRsuffers serious interference, the equalization filter 110 cannot fullycompensate the channel signal VR, so that the compensative signal X isincomplete, and if the CDR unit 120 receives the incomplete compensativesignal X, serious offset or loss-of-lock occurs to the phase and thefrequency of the CLK of the CDR unit 120. At this time, when theequalization filter 110 receives the normal channel signal VR andgenerates the compensative signal X, the CDR unit 120 in the prior artstill repeatedly uses the phase and the frequency of the offset CLK tosample the compensative signal X and obtain sampling data, and a logicoperation unit in the CDR unit 120 uses the sampling data for operationto gradually obtain the phase and the frequency of the normal CLK stepby step, but cannot quickly adjust the CLK. When the circuit in the CDRunit 120 causes serious offset or loss-of-lock of the CLK due to noiseinterference, the CDR unit in the prior art cannot quickly calibrate oradjust the phase and the frequency of the CLK even if the CDR unitreturns to normal condition.

SUMMARY

The disclosure provides a device for NRZ CDR calibration, which uses arun length technique for weight calculation, so as to solve the problemsof the prior art.

An objective of the disclosure is to provide a device for NRZ CDRcalibration, which includes a CDR unit and a weight calculator unit. TheCDR unit is coupled to an equalization filter, and used for receiving acompensative signal to generate a sampling clock signal, a data signal,an error signal and a transition sampling signal. The weight calculatorunit is coupled to the CDR unit, and used for receiving the error signaland the data signal and then performing weight calculation to generateweight data. The CDR unit adjusts the sampling clock signal according tothe weight data.

Another objective of the disclosure is to provide a method for NRZ CDRcalibration, which includes: receiving a compensative signal to generatea sampling clock signal, a data signal, an error signal and a transitionsampling signal; performing weight calculation according to the errorsignal, the transition sampling signal and the data signal to generateweight data; and adjusting the sampling clock signal according to theweight data.

In order to make the aforementioned and other objectives, features andadvantages of the disclosure comprehensible, preferred embodimentsaccompanied with figures are described in detail below.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will become more fully understood from thedetailed description given herein below for illustration only, and thusnot limitative of the present invention, wherein:

FIG. 1 is a functional block diagram of a communication system;

FIG. 2 is a functional block diagram of a device for NRZ CDR calibrationof a communication system;

FIG. 3 is a first embodiment of a weight calculator unit of a device forNRZ CDR calibration;

FIG. 4 is a second embodiment of a weight calculator unit of a devicefor NRZ CDR calibration;

FIG. 5 is a timing chart of a data signal and a transition samplingsignal; and

FIG. 6 is a flow chart of a method for NRZ CDR calibration.

DETAILED DESCRIPTION

FIG. 2 is a functional block diagram of a device for NRZ CDR calibrationof a communication system of the disclosure. Please refer to FIG. 2, inwhich the device for NRZ CDR calibration 105 of the communication system200 includes a CDR unit 120 and a weight calculator unit 130. Atransmitter 101 transfers a transmission signal VX, which becomes achannel signal VR after passing through a channel 102. The channelsignal VR is compensated by the equalization filter 110 into acompensative signal X. The CDR unit 120 is coupled to the equalizationfilter 110, and used for processing the compensative signal X togenerate an error signal E, a sampling clock signal CLK, a transitionsampling signal S and a data signal Z. The weight calculator unit 130 iscoupled to the CDR unit 120, and used for receiving the error signal Eand the data signal Z (embodiment of FIG. 3), or receiving thetransition sampling signal S, the error signal E and the data signal Z(embodiment of FIG. 4), using a run length technique to perform weightcalculation to generate weight data “we”, and adjusting the phase andthe frequency of the CLK according to the weight data “we”.

The disclosure provides the weight calculator unit 130 to use the runlength technique to alleviate the problems of the prior art. Forexample, a binary sequence of the compensative signal X is 1111011111,and here an end portion 011111 of the sequence is used for the purposeof description; it is defined for the purpose of run length operationthat the first code data is a and second code data is b, and if [a b]represents lengths of run length (run length values), of a number ofsuccessive low-order binary bits and a number of successive high-orderbinary bits before and after data transition, the run lengths arerespectively [1 5].

In practice, it is found that the larger an absolute value of a minus“b” (abs(a−b)) is, if the CDR unit 120 has already generated desirablephase and frequency of the CLK, the less likely is the necessity for theCDR unit 120 to adjust the phase and the frequency of the CLK . When “a”is equal to “b” (a=b) (that is, the received successive binary sequenceis 01010101, 001100110011, 000111000111 or 0000111100001111), due todesirable distinguishability (that is, signals 1 and 0 have relativelysymmetrical waveforms), adjustment can be performed quickly according tothe current sequence bits to obtain the phase and the frequency of agood CLK. If 000111 is taken as an example, “a” is equal to 3, “b” isequal to 3, the absolute value of a minus “b” is 0 (abs(3−3)=0), and adesirable phase and frequency of the CLK can be easily obtained by usingthe result to adjust the phase and the frequency of the CLK.

Two embodiments of the device for NRZ CDR calibration are describedbelow.

FIG. 3 shows a first embodiment of the weight calculator unit 130 of thedevice for NRZ CDR calibration 105 of the disclosure. The weightcalculator unit 130 of the device for NRZ CDR calibration 105 includes arun length encoder 21 and an arithmetic calculator 22. The CDR unit 120is coupled to the equalization filter 110, and used for receiving acompensative signal X and operating on sampling data of the compensativesignal X according to a CLK to generate an error signal E, a transitionsampling signal S, a data signal Z and the CLK. The run length encoder21 is coupled to the CDR unit 120, and used for encoding the data signalZ into first code data a and second code data b. The arithmeticcalculator 22 is coupled to the run length encoder 21, and used forreceiving the error signal E, the first code data a and the second codedata b, and performing arithmetic calculation to generate weight data weto the CDR unit 120. The compensative signal X is sampled at a risingedge of the CLK to generate a signal Y, and the signal Y is sampled at afalling edge of the CLK to generate the data signal Z. An exclusive ORgate 13 receives the compensative signal X and the signal Y to generatea signal U, an exclusive OR gate 14 receives the signal Y and the datasignal Z to generate a signal D, and an adder 15 subtracts the signal Dfrom the signal U to provide the error signal E.

Example 1

It is assumed that the data signal Z (00001111) is input to the runlength encoder 21, and the run length encoder 21 uses the run lengthtechnique to encode the data signal to generate a being 4 and “b” being4. At this time, an operational formula of the arithmetic calculator 22is:

we=(max_run_length−abs(a−b))*E  Formula 1

The maximum run length (max_run_length) is a preset run length value,and may be preset to be 5, and accordingly, it is calculated accordingto Formula 1. (we=(5−abs(4−4))*E) that the weight data we=5E, with aweight of 5. The weight data we=5E is sent to the CDR unit 120, and theweight data we=5E will be output to a low-pass filter 16 to filter outhigh frequency noises and control a voltage control oscillator (VCO) 17.It can be seen from Formula 1 that when “a” is equal to b, the weightdata “we” is 5E, indicating that the binary sequence 00001111 of thedata signal Z contains desirable weight data we. By using the desirableweight data we to control the VCO 17, the VCO 17 of the CDR unit 120 canbe quickly adjusted to correct phase and frequency of the CLK.

Example 2

It is assumed that the data signal Z (011111) is input to the run lengthencoder 21, and the run length encoder 21 encodes the data signal Z togenerate a being 1 and “b” being 5. The arithmetic calculator 22 obtainsthrough calculations in accordance with to Formula 1 that the weightdata “we”=(5−abs(1−5))*E, that is, the weight data “we”=1E, with aweight of 1. The weight data “we”=1E is sent to the CDR unit 120, andthe weight data “we”=1E is firstly output to a low-pass filter 16 tofilter out high frequency noises and control a VCO 17. It can be seenfrom Formula 1 that when “a” is 1 and “b” is 5, the weight data “we” is1E, indicating that the binary sequence 011111 of the data signal Z doesnot contain a desirable weight data “we”. The weight data “we” can onlyslightly adjust the VCO 17, and in practice, the VCO 17 may not need tobe adjusted as long as the absolute value of the first code data a minusthe second code data “b” is too large, so as to prevent serious offsetof the phase and the frequency of the CLK due to over-adjustment.

Next, FIG. 4 shows a second embodiment of the weight calculator unit 130of the device for NRZ CDR calibration 105 of the disclosure. Thedifference between the second embodiment of the weight calculator unit120 of FIG. 4 and the first embodiment of FIG. 3 lies in that, in thesecond embodiment, an equalization determination unit 23 is provided toassist the weight calculator unit 130 to determine the state of the CLKof the CDR unit 120. The weight calculator unit 130 of the device forNRZ CDR calibration 105 includes a run length encoder 21, anequalization determination unit 23 and an arithmetic calculator 22. TheCDR unit 120 is coupled to the equalization filter 110, and used forreceiving a compensative signal X to generate an error signal E, atransition sampling signal S, a data signal Z and a CLK. The run lengthencoder 21 is coupled to the CDR unit 120, and used for encoding thedata signal Z into first code data a and second code data b. Theequalization determination unit 23 is coupled to the CDR unit 120, andused for determining whether channel attenuation is over-compensated(over EQ), or under-compensated (under EQ) according to the transitionsampling signal S and the data signal Z, so as to generate anequalization determination result. The arithmetic calculator 22 iscoupled to the run length encoder 21 and the equalization determinationunit 23, and used for receiving the error signal E, the equalizationdetermination result, the transition sampling signal S, the data signalZ, the first code data a and the second code data b, and performingarithmetic calculation to generate weight data “we” and outputting theweight data “we” to the CDR unit 120.

The equalization determination unit 23 may be a digital accumulator, foraccumulating a plurality of transition sampling signals S and datasignals Z and determining whether the current situation is over EQ orunder EQ, so as to generate an equalization determination result. Whenthe equalization determination result is first equalization data, itindicates over EQ, and when the equalization determination result issecond equalization data, it indicates under EQ. Generally, theequalization determination unit 23 is used for accumulating more thantens or hundreds of transition sampling signals S and data signals Z,and determining whether the compensative signal X obtained by theequalization filter 110 compensating the currently received channelsignal VX is over EQ or under EQ.

Next, FIG. 5 is a timing chart of the data signal Z and the transitionsampling signal S. If the input of the CDR unit 120 is a compensativesignal X_(n), the output is a sampling clock signal CLK_(n), atransition sampling signal S_(n) and a data signal Z_(n). The transitionsampling signal S_(n) is a signal obtained by sampling the compensativesignal X_(n) at a negative edge of the sampling clock signal CLK_(n-1),and S_(n-1), represents a signal obtained by sampling the compensativesignal X_(n-1), at a negative edge of the sampling clock signalCLK_(n-2). At this time, the data signal Z_(n) is a signal obtained bysampling the compensative signal X_(n) at a positive edge of the clocksignal CLK_(n-1), and sampling again at a negative edge of the samplingclock signal CLK_(n-1) and Z_(n-1), represents a signal obtained bysampling the compensative signal X_(n-1) at a positive edge of thesampling clock signal CLK_(n-2) and sampling again at a negative edge ofthe sampling clock signal CLK_(n-2).

When the CLK of the CDR unit 120 is in a desirable state or the CLK isalready at a desirable sampling point, a method for determining Under EQis as follows: if a minus “b” is larger than 0 and S_(n-1), is equal toZ_(n-1), or the first code data a minus the second code data “b” issmaller than 0 and S_(n-1), is equal to Z_(n), that is, {[(a−b>0) &(S_(n-1)=Z_(n-1))]or [(a−b<0) & (S_(n-1)=Z_(n)))]}, the compensativesignal X is Under EQ; and a method for determining Over EQ is asfollows: if a minus “b” is smaller than 0 and S_(n-1) is equal toZ_(n-1), or a minus “b” is larger than 0 and S_(n-1) is equal to Z_(n),that is, {[(a−b<0) & (S_(n-1)=Z_(n-1))]or[(a−b>0) & (S_(n-1)=Z_(n)))]},the compensative signal X is Over EQ.

If the equalization determination unit 23 determines that the currentsituation is Under EQ (the second equalization data in the equalizationdetermination result), under the above condition for determining OverEQ, or the equalization determination unit 23 determines that thecurrent situation is Over EQ (the first equalization data in theequalization determination result), under the above condition fordetermining Under EQ, it indicates that at this time the CLK of the CDRunit 120 is not in a desirable state, but is in a serious error orloss-of-lock state, and requires immediate high-weight adjustment. Theoperation is as follows: the arithmetic calculator 22 performsoperations related to the above condition for determining Over EQ orUnder EQ according to the first code data a, the second code data b, thefirst equalization data, the second equalization data, the transitionsampling signal S and the data signal Z , and compares with thedetermination result of the equalization determination unit 23, so as todetermine whether the current CLK of the CDR unit 120 is in a desirablestate or in a serious error or loss-of-lock state; and if the CDR unitis in a serious error state, high-weight calibration needs to beperformed. The following are the related formulas and conditions.

If (the first equalization data is true & {[(a−b>0)&(S _(n-1) =Z_(n-1))]or[(a−b<0)&(S _(n-1) =Z _(n)))]} is true)  Condition 2

calibration=max_run_length

“we”=max(max_run_length−abs(a−b),calibration)*E  Formula 2

else if (the second equalization data is true & {[(a−b<0)&(S _(n-1) =Z_(n-1))]or[(a−b>0) & (S _(n-1) =Z _(n)))]} is true)  Condition 3

calibration=max_run_length

“we”=max(max_run_length−abs(a−b),calibration)*E  Formula 3

else  Condition 4

calibration=0

“we”=max(max_run_length−abs(a−b),calibration)*E  Formula 4

It can be seen from these related formulas and conditions that thesecond embodiment of the disclosure, under the condition of Formula 1 ofthe first embodiment, further provides a determination method when theCLK of the CDR unit 120 is not in a desirable state (in a serious erroror loss-of-lock state), and a corresponding quick calibration mechanism.

Example 1

It is assumed that the data signal Z having a binary sequence of011001111100 is input to the run length encoder 21, in which the numberof successive 0 bits after the 4^(th) bit is 2, that is, the first codedata “a” is 2, and the number of successive 1 bits after the 6^(th) bitis 5, that is, the second code data “b” is 5, and the maximum run length(max_run_length), is set to 5. Condition 2 is true, that is, the firstequalization data is true and the condition for determining Under EQ istrue, indicating that the arithmetic calculator 22 determines thatchannel attenuation is under-compensated; however, the determinationresult of the equalization determination unit 23 according to previousdata is that channel attenuation is over-compensated. Therefore, ifCondition 2 is satisfied, it indicates that serious offset occurs to thephase and the frequency of the current CLK of the CDR unit 120, and inthis case, a maximum calibration needs to be used for quick adjustmentand recovery, and at this time, the calibration is 5. At this time,Formula 2 becomes max(5−abs(2−5),5)*E, indicating that the absolutevalue of the first code data a being 2 minus the second code data “b”being 5 is 3, the result of the maximum run length (max_run_length),being 5 minus 3 is 2, the result being 5 is compared with thecalibration being 5, and a maximum of the two is taken. Therefore, thearithmetic calculator 22 obtains that the weight data “we” is 5E, with aweight of 5, and then sends the weight data “we” being SE to the CDRunit 120 to quickly adjust the VCO 17, so as to adjust the CLK, therebyobtaining desirable phase and frequency.

Example 2

It is assumed that the data signal Z having a binary sequence of011001111100 is input to the run length encoder 21, in which “a” is 2,“b” is 5, and max_run_length is set to be 5. Condition 4 in thearithmetic calculator 22 is satisfied (indicating that neither Condition2 nor Condition 3 is satisfied). At this time calibration=0, andaccordingly Formula 4 becomes max(5−abs(2−5),0)*E, so the arithmeticcalculator 22 obtains that the weight data “we” is 2E, with a weight of2, and then sends the weight data “we” being 2E to the CDR unit 120 toadjust the phase and the frequency of the CLK. The weight data “we”being 2E indicates that desirable phase and frequency of the CLK can beobtained simply by slightly adjusting the VCO 17.

Example 3

It is assumed that the data signal Z having a binary sequence of0110000111100 is input to the run length encoder 21, in which “a” is 4,“b” is 4, and max_run_length is set to be 5. Condition 4 in thearithmetic calculator 22 is satisfied (indicating that neither ofCondition 2 and Condition 3 is satisfied). At this time calibration=0,and accordingly Formula 4 becomes max(5−abs(4−4),0)*E, so the arithmeticcalculator 22 obtains that the weight data “we” is 5E, with a weight of5, and then sends the weight data “we” being 5E to the CDR unit 120. Theweight data “we” being 5E indicates that the compensative signal X hasdesirable distinguishability, and the. CDR unit 120 can operate by usingthe compensative signal X, and use the result of operation to enable theVCO 17 to quickly adjust the phase and the frequency of the CLK.Therefore, the phase and the frequency of the CLK can be quicklyadjusted as long as a successive binary sequence (01010101,001100110011, 000111000111, or 0000111100001111) is received.

It should be noted that parameters and values of the above formulas andconditions are not particularly limited, and the selection of theparameters and the setting of the values may vary with practicalapplications of the system.

Next, FIG. 6 is a flow chart of a method for NRZ CDR calibration of thedisclosure, which includes the following steps.

In Step S110, a compensative signal is received to generate a samplingclock signal, a data signal, an error signal and a transition samplingsignal.

In Step S120, weight calculation is performed according to the errorsignal, the transition sampling signal and the data signal to generateweight data.

In Step S130, the sampling clock signal is adjusted according to theweight data.

The transition sampling signal is obtained by sampling the compensativesignal at a negative edge of the sampling clock signal, and the datasignal is obtained by sampling the compensative signal at a positiveedge of the sampling clock signal and sampling again at the negativeedge of the sampling clock signal. The step of performing the weightcalculation includes using a run length technique to encode the datasignal to generate first code data and second code data, in which thefirst code data is a number of successive low-order binary bits and thesecond code data is a number of successive high-order binary bits, orthe first code data is a number of successive high-order binary bits andthe second code data is a number of successive low-order binary bits.

While the present invention has been described by the way of example andin terms of the preferred embodiments, it is to be understood that theinvention need not to be limited to the disclosed embodiments. On thecontrary, it is intended to cover various modifications and similararrangements included within the spirit and scope of the appendedclaims, the scope of which should be accorded the broadestinterpretation so as to encompass all such modifications and similarstructures.

1. A device for Non Return to Zero (NRZ) Clock Data Recovery (CDR)calibration, comprising: a CDR unit, for receiving a compensative signalto generate a sampling clock signal, a data signal, an error signal anda transition sampling signal; and a weight calculator unit, coupled tothe CDR unit, for receiving the error signal and the data signal andthen performing weight calculation to generate a weight data; whereinthe CDR unit adjusts the sampling clock signal according to the weightdata.
 2. The device for NRZ CDR calibration according to claim 1,wherein the weight calculator unit comprises: a run length encoder,coupled to the CDR unit, for encoding the data signal into a first codedata and a second code data, wherein the first code data is a number ofsuccessive low-order binary bits, and the second code data is a numberof successive high-order binary bits; and an arithmetic calculator,coupled to the run length encoder and the CDR unit, for receiving theerror signal, the first code data and the second code data, andperforming arithmetic calculation to generate the weight data.
 3. Thedevice for NRZ CDR calibration according to claim 2, wherein thearithmetic calculator generates a weight of the weight data according toan absolute value of a difference between the first code data and thesecond code data.
 4. The device for NRZ CDR calibration according toclaim 3, wherein the larger the absolute value of the difference betweenthe first code data and the second code data is, the smaller the weightis.
 5. The device for NRZ CDR calibration according to claim 3, whereinthe arithmetic calculator generates the weight according to a run lengthvalue minus the absolute value of the difference between the first codedata and the second code data.
 6. The device for NRZ CDR calibrationaccording to claim 1, wherein the weight calculator unit receives theerror signal, the transition sampling signal and the data signal andthen performs the weight calculation to generate the weight data, andthe weight calculator unit comprises: a run length encoder, coupled tothe CDR unit, for encoding the data signal into a first code data and asecond code data, wherein the first code data is a number of successivelow-order binary bits, and the second code data is a number ofsuccessive high-order binary bits; an equalization determination unit,coupled to the CDR unit, for determining whether channel attenuation isover-compensated or under-compensated according to the transitionsampling signal and the data signal, so as to generate an equalizationdetermination result; and an arithmetic calculator, coupled to the runlength encoder, for receiving the error signal, the equalizationdetermination result, the transition sampling signal, the data signal,the first code data and the second code data, and performing arithmeticcalculation to, generate the weight data.
 7. The device for NRZ CDRcalibration according to claim 6, wherein the equalization determinationunit is a digital accumulator, for accumulating the transition samplingsignal and the data signal to generate the equalization determinationresult.
 8. The device for NRZ CDR calibration according to claim 6,wherein the arithmetic calculator generates a weight of the weight dataaccording to an absolute value of a difference between the first codedata and the second code data.
 9. The device for NRZ CDR calibrationaccording to claim 6, wherein the arithmetic calculator generates anequalization condition determination result according to the transitionsampling signal, the data signal, the first code data and the secondcode data, compares the equalization condition determination result withthe equalization determination result to generate a determinationresult, and generates a weight of the weight data according to thedetermination result and an absolute value of a difference between thefirst code data and the second code data.
 10. The device for NRZ CDRcalibration according to claim 6, wherein the arithmetic calculatorcompares a run length value minus an absolute value of a differencebetween the first code data and the second code data with a calibrationdata, and uses the larger one of the two to generate a weight of theweight data.
 11. A method for Non Return to Zero (NRZ) Clock DataRecovery (CDR) calibration, comprising: receiving a compensative signalto generate a sampling clock signal, a data signal, an error signal anda transition sampling signal; performing weight calculation according tothe error signal, the transition sampling signal and the data signal togenerate weight data; and adjusting the sampling clock signal accordingto the weight data.
 12. The method for NRZ CDR calibration according toclaim 11, wherein the step of performing the weight calculation furthercomprises: encoding the data signal of a number of successive low-orderbinary bits into a first code data, and encoding the data signal of anumber of successive high-order binary bits into a second code data. 13.The method for NRZ CDR calibration according to claim 12, wherein thestep of performing the weight calculation further comprises: generatinga weight of the weight data according to an absolute value of adifference between the first code data and the second code data.
 14. Themethod for NRZ CDR calibration according to claim 12, wherein the stepof performing the weight calculation further comprises: generating anequalization condition determination result according to the transitionsampling signal, the data signal, the first code data and the secondcode data, comparing the equalization condition determination resultwith the equalization determination result to generate a determinationresult, and generating a weight of the weight data according to thedetermination result and an absolute value of a difference between thefirst code data and the second code data.
 15. The method for NRZ CDRcalibration according to claim 12, wherein the step of performing theweight calculation further comprises: comparing a run length value minusan absolute value of a difference between the first code data and thesecond code data with a calibration data, and using a larger one of thetwo to generate a weight of the weight data.